Implementation of the List count comparison condition.

see: https://drupal.org/node/2281085

This is heavily based on https://github.com/fago/rules/pull/54.