In this paper, we report a technique of controlling the number of single-walled carbon nanotubes (SWNTs) between two electrodes. The SWNT devices consist of an array of SWNTs between two silver/palladium electrodes, which are fabricated with electron beam lithography and silver. Using the tip-sample interaction in contact mode of atomic force microscopy (AFM), the number of individual SWNTs can be controllably decreased. The current-voltage measurements indicate that the resistance increases when the conducting channels of SWNTs are reduced. This simple and controllable approach could be useful for the assembly of high performance devices with a desired number of channels for future electronic investigations.