You can use package variables.
Use @@Rowcount to get the number of rows returned by the query
Assign this @@Rowcount value to a package variable
Generate the file name with GetDate() and assign it to both a package variable and to the file name
You don't need the time the package run as it is in the file name. Or get the time with GetDate() then assign it to both the file name and a package variable.
Then create a second file and write all 3 variables to it.