The thing you are forgetting is to open the file again, but this time using > to indicate you want to write out...
open (RECORD_NUMBER, "counter_data.dat");
while (<RECORD_NUMBER>) {
$count = $_;
}
close RECORD_NUMBER;
open (RECORD_NUMBER, ">counter_data.dat");
print RECORD_NUMBER $count++;
close RECORD_NUMBER;