Get entities by metadata in Elgg 3.X

In Elgg 3.X how do you get entites based on metadata values.

Lets say my entitities are made like the following:

$object = new ElggObject();
$object->subtype = "user_status";
$object->status = "active;
$object->count = 5;
$object->approved = "yes";
$object->access_id = 2;
$object->save();

I only want to get entities based on the following logic.

count > 3

status = "notactive"

approved = "yes"

How would this be done?