add count to relations and scopes

Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
Merge pull request #463 from offlinehacker/master

add count to relations and scopes