moved gifcount to helper lib