record count

i have a file named file_names.dat where there are several files along with their path.
exp:
/data1/dir1/CTA_ACD_20071208.dat
/data1/dir1/CTA_DFG_20071208.dat

i want to write a script which will create a csv file with the name of the file and record count of that file

the output file should look like
/data1/dir1/CTA_ACD_20071208.dat,2500
/data1/dir1/CTA_DFG_20071208.dat,5633

please help me writing the script

what is a 'record'?
what's the "structure" of the files?

each record is terminated by a newline character \n
wc -l /data1/dir1/CTA_ACD_20071208.dat

#!/bin/ksh

(while read file
do
  echo "${file},$(wc -l < ${file}" 
done < 'file_names.dat') > 'file_name.csv'
awk '
{
  "wc -l <"$0 | getline cnt
  print cnt,$0
}' file