A Multi-Loop Vehicle-Counting Method under Gray Mode and RGB Mode