counting system drives in c

Is it possible to know that how many drives are available in the system using Turbo C/C++?
and one more thing , can somebody give me any idea that how can recreate a DOS command "Rename" which can accept the names of number of files as input and can just rename those?