Count returns the number of times the First element of the path occurs in the Rest. Count fails if its argument is the empty path.

Count:<a c b a c b a a a c> = 4. Count:<d c b a c b a a a c> = 0.