Hi @amankumar, welcome to RStudio Community.
You can use functions from the apply family. Here's an example.
data <- data.frame(col1 = c(4, NA, 20, 13, NA),
col2 = c(NA, 3, NA, NA, 4),
col3 = c(2, 21, NA, 5, 15))
sapply(data, function(x) sum(!is.na(x)))
#> col1 col2 col3
#> 3 2 4
Created on 2020-05-27 by the reprex package (v0.3.0)