Relocated count to sub-module
Fixes after tests