Some kind of a counting box (pneumatic tube, interrupted beam, etc), is likely the cheapest method of gross counting.
Video analysis will come, and could be a cheap easy way to differentiate between pedestrians and cyclists. In theory, video analysis could also be used to identify through cyclists. If there was a large enough web of traffic cameras, one might be able to even get a rough estimate of the total number of cyclists in a city, and exclude duplicates.