Dear Rahul,
I have gone through the explanation provided on the link, but it still doesn't explain how you can relate read counts to fragment count. Is there any other way? As you said I could always use the tools, but I want to understand the method of calculating fpkm.
An update (6th October 2018):
You should abandon RPKM / FPKM. They are not ideal where cross-sample differential expression analysis is your aim; indeed, they render samples incomparable via differential expression analysis:
Please read this: A comprehensive evaluation of normalization methods for Illumina high-throughput RNA sequencing data analysis
Also, by Harold Pimental: What the FPKM? A review of RNA-Seq expression units