implemented count-params