Check agains selector count instead of rule count

Fixes #1 

There might too much other changes, but could not help myself...