Fix process count check