Fix ResourceMonitor.countCmd