Implementation of real element counting