In C#, you can read all the lines using File.ReadAllLines() (see https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readalllines?view=netcore-3.1).
Loop through the lines (or use a Linq Where() statement) until you find the one with “total.”
solved How can I read specific data from text file using C# or Vue.js?