Bugfix with count
Fixed cost estimation