how can i calculate p value of miRNA raw reads counts using R?
I would start by re-formulating the question in this post: Your end-goal seems to the differential expression analysis (DEA) of your samples (and you have to have to levels for this like treatment-control, mutant-WT, etc ...). P-values are context-dependent and should be calculated based on your research question/hypothesis.

DEA has been addressed by many researchers and R has a lot of packages to help you with this; DESeq2, edgeR, limma, etc ...

I would go to the Biconductor website, search for one of the three above, and go through their rich vignettes and would come back here for specific questions.