LP counting optimized