@Umamaheswari_Yakkala I think this is a bit of "it depends".
- You might be able to do some of this via Edge Segments in AEP (e.g. clicks on a button using web sdk)
- Many other types of Segments can handle most of the use cases, but not at Edge speed (i.e. at minutes or day speed)
- You can combine 1 & 2 to handle a lot of use cases
- Any kind of "visit" concept is not something AEP Segments handles well today (it can infer, e.g. a page view)
- Counts can be done in AEP Segments, but are done in batch/daily. However, you can use sequential segments to "hard code" page view followed by another page view after 1 day, etc.
- This would need to be combined with 1 to get you both history and real time
A Target Profile script is probably cleaner as @Anil_Umachigi mentioned, but wanted to give you options. If you want a centralized/reusable outside of Target segment, I'd bring it into AEP, if not, Target may be a better approach.