Add ability count by query