Implement the function replace_dots_and_count_replacements(s, queries) that performs the following actions:
Functionality:
Accept a string s consisting of characters, including periods (.).
Process a list of queries, where each query is a tuple (k, p):
k (1-based index) specifies the position in the string s that needs to be replaced with the character p.
After replacing the character at position k with p, count how many times two consecutive dots (..) appear in the modified string s.
Input Requirements:
The function takes two parameters:
A string s of length n (1 ≤ n ≤ 10^5), which may include any characters including periods.
A list queries of length m (1 ≤ m ≤ 10^4), where each element is a tuple of the form (k, p), with k being an integer (1 ≤ k ≤ n), and p being a single character string.
Output Requirements:
The function should return a list of integers, where each integer corresponds to the count of consecutive dot pairs (..) in the string s after each query's character replacement.
File Requirements:
The complete code solution must be written in a file named /app/solution.py.
Please ensure that the implementation is efficient and handles edge cases, such as replacing characters at the beginning or end of the string, and scenarios where multiple replacements may lead to consecutive periods forming or being eliminated.