The response below is assuming both your column types are Single Line of Text, however it would work similarly if you had choice column - intention is to show you a concept.
0 - Initialize an empty array variable
1 - Get Items with ODATA query as status equals On going
2 - Now use Select Filter Array and just get Title column as an Array
3 - Use expression union(Title,Title) to get distinct values of company names
4 - Now use Apply to Each on the company name
5 - Filter Array from Step 1 where Title equals current Item. Count length and store in an array variable from Step 0.
Step # 0,1,2,3 are in screenshot below

Following above steps, I used following test SP List (Screenshot #2) and got output as below (screenshot #3)
SharePoint List

Output

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.