I am trying to pull the count on how many files are in a certain folder. I have a list of the folder names in column A and want the count in column B. I am having trouble with the code I have right now.

Sub NumberFile()

    Dim FolderPath As String, path As String, count As Integer

    Dim c As Range
    For Each c In Range("A1", Cells(Rows.count, "A").End(xlUp))
       FolderPath = c.Offset(0, 1).Formula = "='" & "P:\Tools\14 Day\" & c.Value & "\"
    
    path = FolderPath & "\*.xls"
    fileName = Dir(path)
    Next c
    Do While fileName <> ""
       count = count + 1
        fileName = Dir()
    Loop
End Sub
I am new to VBA, so when I use this macro nothing happens.