Distinct Echo Substrings

Given an input array arg1 containing a string text as its first element (or an empty string when arg1 is empty), return the number of distinct non-empty substrings of text that can be written as the concatenation of some string with itself. In other words, count distinct values s such that s = a + a for some non-empty string a and s appears as a contiguous substring of text.

Duplicate discoveries of the same echo value count only once.

Examples
Input: ["aa"]
Output: 1
Hints

Distinct Echo Substrings

Given an input array `arg1` containing a string `text` as its first element (or an empty string when `arg1` is empty), return the number of **distinct non-empty substrings** of `text` that can be written as the concatenation of some string with itself. In other words, count distinct values `s` such that `s = a + a` for some non-empty string `a` and `s` appears as a contiguous substring of `text`.