Here is my function. It checks for positive values, changes them to ones and sums them.
countPositive :: [Integer] -> Integer
countPositive xs = foldr (+) 0 $ map (^0) (filter (>0) xs)
Is there a better strategy to count positive values without using length but just foldr, map and filter?
Sure, just directly count them with
foldr:Or reimplement
lengthwithfoldr: