You can use SourceCode::LineCounter::Perl under the same terms as Perl itself.