Reverted line counting method.